﻿using System;
using System.ComponentModel;

namespace SteamGroupPlayers.Utilities
{
    /// <summary>
    /// Helper class, implementing "RaisePropertyChanged" for use in custom Property code as well as the INotifyPropertyChanged-related Event.
    /// </summary>
    public class NotifyPropertyChanged : INotifyPropertyChanged
    {
        #region Events
        public event PropertyChangedEventHandler PropertyChanged; 
        #endregion

        #region Methods
        protected void RaisePropertyChanged(String property)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(property));
            }
        } 
        #endregion
    }
}
